<?php
//NEW NOTIFICATION
$note_count = mysql_num_rows(safe_query("SELECT * FROM notification WHERE user='".$userID."' AND isread='0'"));
if($note_count) {
$new_note = '<span class="note">'.$note_count.'</span>';
}

//NOTIFICATIONS
$notifications = safe_query("SELECT * FROM notification WHERE user='".$userID."' ORDER by date LIMIT 0,5");
$notification_list = '';
while($note = mysql_fetch_array($notifications))
{
$type = $note['win'] == 1 ? "win-bet" : "lost-bet";
$win = $note['money'];
$title = cut($note['title'], 28);
$content = cut($note['content'], 33);

eval ("\$note_list = \"".gettemplate("note_list")."\";");
$notification_list .= $note_list;
}

?>